<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增工作记录')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-ncNormalWorks-add">
        <input type="hidden" name="workType" th:value="${workType}"/>
        <div class="form-group">
            <label class="col-sm-3 control-label">工作名称：</label>
            <div class="col-sm-8">
                <input id="nWorckName" name="nWorckName" required class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">参与人员：</label>
            <div class="col-sm-8">
                <input id="workers" name="workers" required class="form-control" type="text" th:value="${userName}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">核验人：</label>
            <div class="col-sm-8">
                <input id="checkUser" name="checkUser" required class="form-control" type="text" th:value="${userName}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">工作时长（时）：</label>
            <div class="col-sm-8">
                <input id="timeLength" name="timeLength" class="form-control" type="number" step="0.1" onkeyup=" value=value.replace(/^((\d+\.\d*[1-9]\d{1}))$/,'')" min="0">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">工作内容：</label>
            <div class="col-sm-8">
                <input id="content" name="content" required class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <textarea id="remark" rows="4" name="remark" class="form-control" type="text"></textarea>
            </div>
        </div>
        <!--<div class="form-group">
            <label class="col-sm-3 control-label">单子类型： 1：生产计划单 2：育苗计划单 3：订单记录单 4：检测记录单 5：菜房1：入库单 6：菜房1：出库单 7：菜房2：入库单 8：菜房2：出库单 9：植保记录单 10：牛舍入库单 11：牛舍：出库单 12：鸡舍入库单 13：鸡舍出库单 14：牛舍诊疗单 15：牛舍免疫单 ：16：牛舍巡视单  17：鸡舍诊疗单 18：鸡舍免疫单 ：19：鸡舍巡视单 ：</label>
            <div class="col-sm-8">
                <input id="workType" name="workType" class="form-control" type="text">
            </div>
        </div>-->
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "system/ncNormalWorks"
    $("#form-ncNormalWorks-add").validate({
        rules: {
            xxxx: {
                required: true,
            },
        },
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-ncNormalWorks-add').serialize());
        }
    }
</script>
</body>
</html>
